import request from "../util/request"

// 添加广告
export const addAdvRequest = (forData) => {
  return request.post("/addAdv", forData)
}
//查询广告
export const advListRequest = (pageNO, everyNo) => {
  return request.get(`/advList/${pageNO}/${everyNo}`)
}
//删除广告
export const deleteAdvListRequest = (_id) => {
  return request.delete("/deleteAdv", {
    params: {
      _id
    }
  })
}
//更新广告获取当前广告的信息
export const getUpdateDataRequest = (_id) => {
  return request.get("/getUpdateData", {
    params: {
      _id
    }
  })
}

//更新广告
export const updateAdvRequest = (forData, _id) => {
  return request.put("/updateAdv", forData, {
    params: {
      _id
    }
  })
}